Skip to content

Add NaN validation for ashbyRequestDelayMs config parsing#3

Merged
Mayank-glitch-cpu merged 2 commits intocodex/integrate-ashby-job-ingestion-strategyfrom
copilot/sub-pr-2
Feb 11, 2026
Merged

Add NaN validation for ashbyRequestDelayMs config parsing#3
Mayank-glitch-cpu merged 2 commits intocodex/integrate-ashby-job-ingestion-strategyfrom
copilot/sub-pr-2

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

Addresses feedback from PR #2: parseInt() on non-numeric ASHBY_REQUEST_DELAY_MS returns NaN, which silently disables request throttling when checked via > 0.

Changes:

  • Add Number.isNaN() check after parsing to detect invalid values
  • Fall back to default 1000ms when parsing fails

Before:

ashbyRequestDelayMs: parseInt(process.env.ASHBY_REQUEST_DELAY_MS || '1000', 10),
// If ASHBY_REQUEST_DELAY_MS="invalid", returns NaN
// Later check: config.ashbyRequestDelayMs > 0 evaluates false, disables throttling

After:

ashbyRequestDelayMs: (() => {
  const parsed = parseInt(process.env.ASHBY_REQUEST_DELAY_MS || '1000', 10);
  return Number.isNaN(parsed) ? 1000 : parsed;
})(),
// If ASHBY_REQUEST_DELAY_MS="invalid", returns 1000
// Later check: config.ashbyRequestDelayMs > 0 evaluates true, throttling works

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Mayank-glitch-cpu <85422185+Mayank-glitch-cpu@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on Ashby slug pool and filter API enhancements Add NaN validation for ashbyRequestDelayMs config parsing Feb 11, 2026
@Mayank-glitch-cpu Mayank-glitch-cpu marked this pull request as ready for review February 11, 2026 18:54
@Mayank-glitch-cpu Mayank-glitch-cpu merged commit cbddac3 into codex/integrate-ashby-job-ingestion-strategy Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants